const express = require("express");
const router = express.Router();
// 导入用户信息的处理函数模块
const TouristInfo_handler = require("../router_handler/touristInfo");
const expressJoi = require("@escook/express-joi");
const {
  update_userinfo_schema,
  update_password_schema,
} = require("../schema/tourist");
// 获取用户的基本信息
router.get("/userinfo", TouristInfo_handler.getUserInfo);
// 更新用户的基本信息
router.post(
  "/userinfo",
  expressJoi(update_userinfo_schema),
  TouristInfo_handler.updateUserInfo
);

// 重置密码的路由
router.post(
  "/updatepwd",
  expressJoi(update_password_schema),
  TouristInfo_handler.updatePassword
);
module.exports = router;
